<template>
<div>
  <h2>Movie组件</h2>
<!--  动态组价-->
  <div>
    <button @click="detailCom='A'">A</button>
    <button @click="detailCom='B'">B</button>
    <button @click="detailCom='C'">C</button>
  </div>
  <component :is="detailCom"></component>

</div>
</template>

<script>
export default {
  name: "index",
  data(){
    return{
      detailCom:''
    }
  },
  components:{
    A:()=>import('@/components/A'),
    B:()=>import('@/components/B'),
    C:()=>import("@/components/C")
  }
}
</script>

<style scoped>

</style>